{% extends user.is_superuser|yesno:"admin/bootstraped_base_site.html,registration/normaluser_bootstraped_base_site.html" %}
{% load i18n %}{% load url from future %}

{% if user.is_superuser%}
	{% block breadcrumbs %}
	<ul class="breadcrumb">
	<li><a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> <span class="divider">/</span></li>
	<li>{% trans 'Password reset confirmation' %}</a>
	</ul>
	{% endblock %}

	{% block title %}{% trans 'Password reset' %}{% endblock %}
{% endif %}

{% block content_title %}
	{% if user.is_superuser %}
		<a class="brand">{% trans 'Password reset' %}</a>
	{% else %}
		{% trans 'Password reset' %}
	{% endif %}
{% endblock %}

{% block content %}

{% if validlink %}

<h1>{% trans 'Enter new password' %}</h1>

<div class="alert alert-info">{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</div>

<form class="form" action="" method="post" role="form">{% csrf_token %}
	<div class="form-group">
		<label for="id_new_password1">{% trans 'New password:' %}</label>
		{{ form.new_password1 }}
		{% if form.new_password1.errors %}<span class="help-inline">{{ form.new_password1.errors|striptags }}</span>{% endif %}
	</div>
	<div class="form-group">
		<label for="id_new_password2">{% trans 'Confirm password:' %}</label>
		{{ form.new_password2 }}
		{% if form.new_password2.errors %}<span class="help-inline">{{ form.new_password2.errors|striptags }}</span>{% endif %}
	</div>
	<div class="form-group">
		<input type="submit" class="btn btn-primary" value="{% trans 'Change my password' %}" />
	</div>
</form>
<script>
$('#id_new_password1').addClass('form-control');
$('#id_new_password2').addClass('form-control');
</script>
{% else %}

<h1>{% trans 'Password reset unsuccessful' %}</h1>

<div class="alert alert-warning">{% trans "The password reset link was invalid, possibly because it has already been used.  Please request a new password reset." %}</div>

{% endif %}

{% endblock %}
